<template>
	<div class="mainContent">
		<div class="bread-nav">
		    <span class="bread-item">供应商管理</span>
		    <span class="bread-icon">&gt;</span>
		    <span class="bread-item">供应商基本信息</span>
		    <span class="bread-icon">&gt;</span>
		    <span class="bread-item">工费</span>
		</div>
		<!-- <pathTracking :path="Model.path" /> -->
		<div class="container">
			<div class="searchbox">
				<!-- 搜索框 -->
				<advancedSearch :option="Model.filterOption" @getChild="showChild" @onSearch="toSearch" @onClear="toClear"
				 @onExport="toExport"></advancedSearch>
			</div>
			<div class="table">
				<el-row>
					<div class="common-table-title">
						<div class="common-table-icon"></div>
						<div class="common-table-fl">供应商工费</div>
						<div class="common-btn-group">
							<div class="common-table-btn-item">导出</div>
						</div>
					</div>
				</el-row>
				<el-row class="table-bg">
					<el-table :data="Model.tableData" stripe border :row-style="selectedHighlight" @selection-change="handleSelectionChange">
						<el-table-column type="selection" width="50" fixed></el-table-column>
						<el-table-column v-for="(item,index) in Model.tableHeaderData" :key="item.prop" :prop="item.prop" :label="item.label"
						 :width="item.width" align="center">
						</el-table-column>
						<el-table-column label="喷蜡费" align="center" fixed="right" width="180">
							<template slot-scope="scope">
								<el-button type="text" @click="showDetial(scope.row)"><a class="detial-link">{{scope.row.fee}}</a></el-button>
							</template>
						</el-table-column>
					</el-table>
				</el-row>
				<!--  -->
				<el-row class="pagination-cont">
					<el-pagination @size-change="handleSizeChange" background @current-change="handleCurrentChange" :current-page="Model.paginationObject.currentPage"
					 :page-sizes="[10, 20, 30, 40]" :pager-count="5" :page-size="Model.paginationObject.pageSize" layout="sizes, prev, pager, next, jumper, slot"
					 :total="Model.paginationObject.total">
						<div class="pagination-slot">
							显示
							<p class="slot-i">{{Model.paginationObject.num1}}</p>
							到
							<p class="slot-i">{{Model.paginationObject.num2}}</p>
							，共
							<p class="slot-i">{{Model.paginationObject.total}}</p>
							记录
						</div>
					</el-pagination>
				</el-row>
			</div>
			
		</div>
		<!-- 支付弹框 -->
		<el-dialog :visible.sync="Model.dialogFormVisible" top="100px" class="viewDialog">
			<div class="common-table-title">
				<div class="common-table-icon"></div>
				<div class="common-table-fl">喷蜡费</div>
			</div>
			<div style="padding:30px;background: #fff;">
				
				<el-table :data="Model.dialogTableData" stripe border :row-style="selectedHighlight">
					<el-table-column v-for="(item,index) in Model.dialogTableHeaderData" :key="item.prop" :prop="item.prop" :label="item.label"
					 :width="item.width" align="center">
					</el-table-column>
				</el-table>
			</div>
		</el-dialog>
		
	</div>
</template>

<script>
	import pathTracking from "@/components/common/pathTracking";
	import pagination from "@/components/common/pagination.vue";
	import advancedSearch from "@/components/common/filter/advancedSearch";
	import {
		getDateString
	} from "@/assets/js/common.js";
	import Model from "./model.js";
	import Controller from "./controller.js";
	export default {
		name: "purchase",
		mixins: [Model, Controller],
		components: {
			advancedSearch,
			pagination,
			pathTracking
		}
	};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
	@import "./index.less";
</style>
